package com.sun.java.basicio.iostream;

public class format2 {

	/**
	 * d formats an integer value as a decimal value. 
       f formats a floating point value as a decimal value. 
       n outputs a platform-specific line terminator. 
       x formats an integer as a hexadecimal value.
       s formats any value as a string.              
	 * @param args
	 */
	public static void main(String[] args) {

		int i = 2;
        double r = Math.sqrt(i);
       
        System.out.format("The square root of %d is %f.%n", i, r);
        //Result:
        //The square root of 2 is 1.414214.


	}

}
